<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Frameset//EN">
<html>
<head>
<title>How the Library Works</title>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <meta name="generator" content="Doc-O-Matic" />
    <meta http-equiv="Content-Style-Type" content="text/css" />
    <link rel="STYLESHEET" href="default.css" type="text/css" />

<script type="text/javascript" src="scripts.js"></script>
</head>
<body class="Element700" onload="onBodyLoadEx('frames.html', 'topic', '00761.html');" onmousedown="onBodyMouseDown();">

<!-- Begin Popups -->

<!-- End Popups -->

<!-- Begin Page Header -->
<div class="Element710" id="areafixed">
<div class="Element94">
<a href="01259.html" target="topic">System Service Libraries Help</a> &gt; <a href="00759.html" target="topic">Time System Service Library Help</a> &gt; <a href="00764.html" target="topic">Using the Library</a> &gt; <a href="00761.html" target="topic">How the Library Works</a></div>
<div class="Element92">
<table width="100%" cellspacing="0" cellpadding="0">
<tr><td width="25%">
<div class="Element1">
MPLAB Harmony Core Help</div>
</td><td width="25%">
<div class="Element2">
<a href="contents.html" target="tocidx">Contents</a> | <a href="00007.html" target="topic">Home</a></div>
</td><td width="25%">
<div class="Element90">
<a href="00752.html" target="topic">Previous</a> | <a href="00764.html" target="topic">Up</a> | <a href="00755.html" target="topic">Next</a></div>
</td><td width="25%">
<div class="Element96">
<a href="mailto:docerrors@microchip.com&subject=MPLAB Harmony Documentation Feedback (Topic ID: SYS TIME SYS SVC How the Library Works (System Services) Topic Title: How the Library Works)&body=Thank you for your feedback! Please include a description of your feedback, and indicate whether you are reporting an an error in the documentation or an enhancement.">Documentation Feedback</a><br> <a href="http://support.microchip.com" target="_blank">Microchip Support</a></div>
</td></tr></table><div class="Element5">
How the Library Works</div>
</div>
</div>

<!-- End Page Header -->

<!-- Begin Client Area -->
<div class="Element720" id="areascroll">
<div class="Element721">

<!-- Begin Page Content -->
<a name="PageContent"></a><div class="Element58">
<a name="4465736372697074696F6E"></a><div class="Element11">
<div class="Element10">
<p class="Element10">
The tick-less implementation reduces the overheads of servicing the unneeded hardware timer interrupt on every tick. The tick-less implementation can also provide higher resolution compared to a tick based implementation, as there is no fixed tick rate.&nbsp;</p>
<p class="Element10">
&nbsp;</p><div class="Element15">
Execution Flow</div>

<ul class="Element630">
<li class="Element600">The Time System Service registers a callback with the underlying hardware timer peripheral library</li>
<li class="Element600">Depending on the alarm/delay time periods requested by various clients, the implementation manages the hardware timer such that a compare interrupt is generated only when needed and at appropriate times
<ul class="Element631">
<li class="Element601">This is achieved by maintaining a sorted list of timing requested by different clients such that the head of the list always indicates the time after which the hardware timer must interrupt and notify the Timer System Service</li>
</ul></li>
<li class="Element600"> Inside the Time System Service callback, the list is updated and a callback is given to the client for which the alarm/delay has expired</li>
</ul><p class="Element10">
&nbsp;</p>
<p class="Element10">
The following diagram shows how the tick-less implementation reduces the number of hardware interrupts. In this example, two clients - Client A and Client B requests a periodic alarm every 30 ms and 70 ms respectively. </p><p class="Element10" style="text-align: center;">
&nbsp;</p>
<p class="Element10" style="text-align: center;">
<img src="time_sys_service_time_diagram.png" border="0" alt="" title="">&nbsp;</p></div>
</div>
</div>
<!-- End Page Content -->

<!-- Begin Page Footer -->
<div class="Element95">
<a href="01259.html" target="topic">System Service Libraries Help</a> &gt; <a href="00759.html" target="topic">Time System Service Library Help</a> &gt; <a href="00764.html" target="topic">Using the Library</a> &gt; <a href="00761.html" target="topic">How the Library Works</a></div>
<div class="Element93">
<table width="100%" cellspacing="0" cellpadding="0">
<tr><td width="25%">
<div class="Element3">
MPLAB Harmony Core Help</div>
</td><td width="25%">
<div class="Element4">
<a href="contents.html" target="tocidx">Contents</a> | <a href="00007.html" target="topic">Home</a></div>
</td><td width="25%">
<div class="Element91">
<a href="00752.html" target="topic">Previous</a> | <a href="00764.html" target="topic">Up</a> | <a href="00755.html" target="topic">Next</a></div>
</td><td width="25%">
<div class="Element97">
<a href="mailto:docerrors@microchip.com&subject=MPLAB Harmony Documentation Feedback (Topic ID: SYS TIME SYS SVC How the Library Works (System Services) Topic Title: How the Library Works)&body=Thank you for your feedback! Please include a description of your feedback, and indicate whether you are reporting an an error in the documentation or an enhancement.">Documentation Feedback</a><br> <a href="http://support.microchip.com" target="_blank">Microchip Support</a></div>
</td></tr></table></div>

<!-- End Page Footer -->
</div>
</div>

<!-- End Client Area -->
</body></html>